home *** CD-ROM | disk | FTP | other *** search
- Path: dispatch.news.demon.net!demon!gw-pc.industry.ivab.se
- From: Goran Wireen <Goran_Wireen@ivab.se>
- Newsgroups: comp.lang.c
- Subject: Is it possible to have one Makefile for several compilers?
- Date: Fri, 16 Feb 1996 15:23:31 +0100
- Message-ID: <31249363.1664@ivab.se>
- NNTP-Posting-Host: gw-pc.industry.ivab.se
- X-NNTP-Posting-Host: gw-pc.industry.ivab.se
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
- MIME-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
-
- I would like to use the same Makefile for different compilers
- (Gnu C/C++, Unix cc, CXX). I was hoping that I easily could
- select compiler by calling e.g:
-
- make gcc all
-
- and by using a Makefile that looks something like this:
-
- # Default compiler is cc
- CC = cc
-
- cxx:
- CC = cxx
-
- gcc:
- CC = gcc
-
- all:
- $(CC) $(CFLAGS_AND_STUFF) $(SOURCES) ...
-
- But as you can assign macros in the command lines below cxx: and
- gcc: this won't work.
-
- Does anybody have any idea how I can select compiler in a simple
- way?
-
-
- Email me at Goran_Wireen@ivab.se
-
- /Goran Wireen, Combitech Innovativ Vision, Sweden
-